@extends('layouts.back_stage')
@section('content')
    <style>
        .seek_p{width:100%;margin:0 auto;padding-top:10px;}
        .seek_lab{width:185px;line-height:30px;margin-right:10px;}
        .seek_sel{width:130px;height: 30px;line-height:30px;float:right;outline:none;font-size: 13px;padding:5px 10px;font-weight: normal;border-radius: 2px;color: #555;background:#fff;background-image: none;border: 1px solid #cfdadd;box-shadow: none;}
        .bt_del{text-align: center;display:inline-block;}
        .fabric-choose{width:100%;line-height:30px;height:30px;margin:20px auto;}
        .fabric_div1{width:250%;}
        .fabric_div2{width:100%;height:180px;}
        .fabric_div3{width:100%;height:560px;}
        .tab1,.tab2,.tab3{border-collapse:collapse;width:100%;font-size:14px;color:#383838;background:#fff;margin-bottom:10px;}
        table td{text-align:center;height:35px;}
        table,th,td{border:1px solid #ccc;}
        .oneTb{width:100%;overflow-x:scroll;overflow-y:hidden;margin-bottom:0;}
        .twoTb,.threeTb{width:68%;overflow:scroll;float:right;}
        .one_tr,.two_tr{cursor:pointer;}
        .one_tr.in{background:#27c24c;color:#fff;}
        .two_tr.on{background:#27c24c;color:#fff;}
        ::-webkit-scrollbar{width:5px;height:5px;}
        .colb{color:#1aad1a;}
    </style>
    <div class="container">
        {{--bom--}}
        <div style="padding:20px 0;"><h3>Bom列表</h3></div>
        <div class="form-group">
            <form action="/bom-cost-manager/bom-lists" method="get" >
                {{--{{ csrf_field() }}--}}
                <p class="seek_p">
                    <label class="seek_lab" style="width:205px;">销售季节：
                        <select class="seek_sel" name="sale_quarter">
                            <option value="">请选择</option>
                            @foreach($season as $k => $v)
                                <option value="{{$v}}" @if(isset($req->sale_quarter) &&  $req->sale_quarter==$v) selected @endif>{{$v}}</option>
                            @endforeach
                        </select>
                    </label>
                    <label class="seek_lab" style="width:185px;">品牌：
                        <select class="seek_sel" name="brand">
                            <option value="">请选择</option>
                            @foreach($brands as $k => $v)
                                <option value="{{$k}}" @if(isset($req->brand) &&  $req->brand==$k) selected @endif >{{$v}}</option>
                            @endforeach
                        </select>
                    </label>
                    <label class="seek_lab">状态：
                        <select class="seek_sel" name="status">
                            <option value="">全部</option>
                            @if(isset($req->status))

                                @if($req->status==1)
                                    <option value="1" selected>未审核</option>
                                @elseif($req->status==2)
                                    <option value="2" selected>已审核</option>
                                @endif
                            @endif
                            <option value="2">已审核</option>
                            <option value="1">未审核</option>
                        </select>
                    </label>

                    <label class="seek_lab">款号：<input class="seek_sel" type="text" autocomplete="off" autocorrect="off" placeholder="款号" value="{{$req->girard}}" name="girard" /></label>
                    <button type="submit" class="btn bt_del btn-info">搜索</button>
                    <a class="btn bt_del btn-info" href="javascript:;" onclick="emptyFabric()">清空</a>
                </p>
            </form>
        </div>
        <div class="fabric-choose">
            <span>共<span class="mate_count">{{$infos_count}}</span>条信息</span>
            <a class="btn btn-danger bt_a" href="javascript:;" onclick="versaInfo()">反审</a>
            <a class="btn btn-info bt_a" href="javascript:;" onclick="auditInfo()">审核</a>
            <a class="btn btn-info bt_a" href="javascript:;" onclick="copyInfo()">复制</a>
            <a class="btn btn-info bt_a" href="javascript:;" onclick="editInfo()">修改</a>
            <a class="btn btn-info bt_a" href="javascript:;" onclick="addInfo()">新增</a>
        </div>
        <div style="width:30%;float:left;">
            <div class="form-group oneTb">
                <div class="fabric_div1">
                    <table class="tab1" border="1" cellspacing="0" cellpadding="0">
                        <thead>
                        <tr>
                            <td>版本号</td><td>款号</td><td>波段</td><td>吊牌价/元</td><td>单位</td>
                            <td>品名</td><td>品牌</td><td>销售季节</td><td>年份</td><td>季节</td>
                            <td>中分类</td><td>小分类</td>
                        </tr>
                        </thead>
                        <tbody>
                        @if(count($infos)>0)

                            @foreach($infos as $k => $v)
                                <tr class="one_tr" abc="{{$v->girard}}" gg="{{$v->id}}">
                                    <td>@if(is_null($v->bom))无版本@else {{$v->bom}} @endif</td>
                                    <td>{{$v->girard}}</td>
                                    <td>@if($v->band_id!=0){{$v->band}}@else 无波段@endif</td>
                                    <td>{{$v->retail_price}}</td>
                                    <td>{{$v->unit}}</td>
                                    <td>{{$v->name}}</td>
                                    <td>@if($v->brand){{$brands[$v->brand]}}@endif</td>
                                    <td>{{$v->sale_quarter}}</td>
                                    <td>{{$v->year}}</td>
                                    <td>{{$v->quarter}}</td>
                                    <td>{{$category[$v->cate2]}}</td>
                                    <td>{{$category[$v->cate3]}}</td>

                                </tr>
                            @endforeach
                        @endif
                        </tbody>
                    </table>
                </div>
            </div>
            <span style="float:right;">{{$infos->appends(['girard'=>$req->girard,'status'=>$req->status,'brand'=>$req->brand])->links()}}</span>
        </div>
        <div style="width:1%;border-right:1px solid #ccc;float:left;height:800px;"></div>
        <div class="form-group twoTb">
            <div class="fabric_div2">
                <table class="tab2" border="1" cellspacing="0" cellpadding="0">
                    <thead>
                        <tr>
                            <td>款号</td><td>版本号</td><td>录入人</td><td>录入时间</td><td>修改人</td><td>修改时间</td>
                            <td>审核人</td><td>审核时间</td><td>状态</td><td>备注</td>
                        </tr>
                    </thead>
                    <tbody>

                    </tbody>
                </table>
            </div>
        </div>
        <div style="width:69%;border-top:1px solid #ccc;float:right;height:1px;margin:10px 0"></div>
        <div class="form-group threeTb">
            <div class="fabric_div3">
                <table class="tab3" border="1" cellspacing="0" cellpadding="0">
                    <thead>

                        <tr>
                            <td>版本号</td><td>款号</td><td>颜色</td><td>尺码</td><td>分类</td><td>供应商货号</td>
                            <td>面料色卡号</td><td>成本价/元</td><td>面辅料用量</td><td>门幅</td>
                        </tr>
                    </thead>
                    <tbody>

                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <script src="{{env('CDN_DOMAIN_NAME')}}/js/bomLis.js?v=1.0.2"></script>
@endsection
